# Contributor: Shiz <hi@shiz.me>
# Maintainer: Shiz <hi@shiz.me>
pkgname=bobcat
pkgver=4.09.00
pkgrel=0
pkgdesc="Brokken's Own Base Classes And Templates"
url="https://gitlab.com/fbb-git/bobcat"
arch="all"
license="GPL-2.0-or-later"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="icmake bash yodl"
subpackages="$pkgname-doc $pkgname-dev"
options="!check"  # no tests provided by upstream.
source="bobcat-$pkgver.tar.gz::https://gitlab.com/fbb-git/bobcat/-/archive/$pkgver/bobcat-$pkgver.tar.gz
	dont-use-reserved-name-for-page-size.patch
	avoid-gnuisms.patch
	avoid-strerror_r.patch
	"
builddir="$srcdir/bobcat-$pkgver/bobcat"

prepare() {
	default_prepare

	sed -i '/^#define DOC/d' INSTALL.im
	echo '#define DOC "/usr/share/doc/bobcat"' >> INSTALL.im
}

build() {
	./build light strip
	./build man
}

package() {
	./build install hlm "$pkgdir"
}

sha512sums="
03357d7b6dc00d7f41a59775703e42474b07ef121a4187270b439b8e23ddd0f1e43d1fba5fa27839cc2426cb01fd800c42f1da931280331dcc29b4cc8d64f816  bobcat-4.09.00.tar.gz
6521da77c2452fb2c4b209c24e5dae04650636224efe5e75e2f2e64ab1c6457392ad4cdc4afbe79526734c8211488b2dc5915210ee7af646e7d0af04579cd484  dont-use-reserved-name-for-page-size.patch
24eb74e7dab68cb70f89459228f0f302a5214f8d45bc31e38a8d608edfa97cfe61710212fface32fc480fc4ef2fb23bbca7ed806dd40330e6da69774b3d1965d  avoid-gnuisms.patch
1129bb0666f6809ab2cca60bb164f4c557be7d27db84e41712643ee5027b8c7b62bc82e8f1c5fa9a1e737e487fe58f163afd6687d94fbacb9a23ad7818851cf0  avoid-strerror_r.patch
"
